package com.bdqn.bookshop.common;

import java.io.File;

/**
 * @author : 罗若然[LUO_RUO_RAN]
 * @date : 2020-07-24 11:41
 **/
public class BookConstants {

    public  static      String  SAVE_PATH="static"+File.separator+"client"+File.separator+"img"+ File.separator;
    public  static      String  MAPPING_PATH="static/client/img/";

    /**
     * 普通用户登录存储在session中的key
     */
    public static final String LOGIN_MALL_USER="mallUser";

    /**
     * 管理员登录存储在session中的key
     */
    public static final String LOGIN_ADMIN_USER="adminUser";

    /**
     * 验证码key
     */
    public static final String MALL_VERIFY_CODE_KEY = "mallVerifyCode";

    /**
     * 首页轮播图数量
     */
    public static Integer GAROUSEL_LIMIT=5;

    /**
     * 首页最新图书数量
     */
    public static Integer NEW_BOOKS_LIMIT=14;
    /**
     * 首页分类图书数量
     */
    public static Integer CLASSIFY_BOOKS_LIMIT=12;

    /**
     * 轮播图上传路径
     */
    public static  String GAROUSEL_SAVE_PATH = SAVE_PATH+"system/garousel/";

    /**
     * 轮播图映射路径
     */
    public static  String GAROUSEL_MAPPING_URL = MAPPING_PATH+"system/garousel";

    /**
     * 指南图上传路径
     */
    public static  String GUIDE_SAVE_PATH = SAVE_PATH+"system/guide/";

    /**
     * 指南图映射路径
     */
    public static  String GUIDE_MAPPING_URL = MAPPING_PATH+"system/guide";

    /**
     * 系统设置图片上传路径
     */
    public static  String SETTING_SAVE_PATH = SAVE_PATH+"system/setting/";

    /**
     * 系统设置图片映射路径
     */
    public static  String SETTING_MAPPING_URL = MAPPING_PATH+"system/setting";

    /**
     * 书籍图片上传路径
     */
    public static  String BOOKS_SAVE_PATH = SAVE_PATH+"books/";

    /**
     * 书籍图片映射路径
     */
    public static  String BOOKS_MAPPING_URL = MAPPING_PATH+"books";


    public  static     void   resetNewPath(  String  SAVE_PATH,String  MAPPING_PATH){
        BookConstants.SAVE_PATH=SAVE_PATH;
        BookConstants.MAPPING_PATH=MAPPING_PATH;
        GAROUSEL_MAPPING_URL=MAPPING_PATH+"system/garousel/";
        GAROUSEL_SAVE_PATH=SAVE_PATH+"system"+File.separator+"garousel";
        GUIDE_MAPPING_URL=MAPPING_PATH+"system/guide/";
        GUIDE_SAVE_PATH=SAVE_PATH+"system"+File.separator+"guide";
        SETTING_MAPPING_URL=MAPPING_PATH+"system/setting/";
        SETTING_SAVE_PATH=SAVE_PATH+"system"+File.separator+"setting";
        BOOKS_MAPPING_URL=MAPPING_PATH+"books/";
        BOOKS_SAVE_PATH=SAVE_PATH+"books";
    }
}
